API Documentation
Public Member Functions | List of all members
nkGraphics::GlobalTimerManager Class Reference

Manages the timers attached to contexts. Usually timers can be useful for deltas of frames. More...

Inheritance diagram for nkGraphics::GlobalTimerManager:

Public Member Functions

GlobalTimercreateOrRetrieve (RenderContext *forContext)
 
void prepareForContext (RenderContext *context)
 
GlobalTimergetActiveTimer () const
 

Detailed Description

Manages the timers attached to contexts. Usually timers can be useful for deltas of frames.

Manager owns all the memory it allocates. External code should never delete it.

Member Function Documentation

◆ createOrRetrieve()

GlobalTimer* nkGraphics::GlobalTimerManager::createOrRetrieve ( RenderContext forContext)

Creates if unavailable, or retrieve if available, a timer attached to a context.

Parameters
forContextThe context for which to get a timer.
Returns
The timer attached. Manager owns it. External code should never delete it.

◆ prepareForContext()

void nkGraphics::GlobalTimerManager::prepareForContext ( RenderContext context)

Prepares the Manager for a context. This will fetch the right timer for the

◆ getActiveTimer()

GlobalTimer* nkGraphics::GlobalTimerManager::getActiveTimer ( ) const
Returns
Currently active timer.

The documentation for this class was generated from the following file: